<template>
	<view class="phone_login">
		<view class="top_text">
			欢迎来到小程序
		</view>
		<view class="content">
			<view class="input_box_text">
				<u-input placeholder="输入手机号" prefixIcon="phone" border="none" v-model="value.phoneNum"
					@change="change"></u-input>
			</view>
			<view class="input_box_check mt-20 relative">
				<u-input placeholder="输入验证码" prefixIcon="email" border="none" v-model="value.checkNum"
					@change="change"></u-input>
				<text class="check_btn">发送验证码</text>
			</view>
			<view class="submit">
				<u-button @click="submit" type="default" shape="circle" color="#d9d9d9" hairline="false" text="登录">
					<text style="color: black;">登录</text>
				</u-button>
			</view>
			<view class="text-center mt-20 to_reg"  @click="toReg">
				没有账号？去注册
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: {
					phoneNum: null,
					checkNum: null
				}
			}
		},
		methods: {
			change(e) {
				console.log(e);
			},
			submit() {
				console.log(this.value)
				uni.switchTab({
					url: '/pages/tabbar/index/index'
				})
			},
			toReg() {
				uni.navigateTo({
					url: '/subpackPage/regist/regist'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.phone_login {
		padding: 100rpx;

		.top_text {
			margin-bottom: 250rpx;
			font-size: 39rpx;
			// margin: 160rpx auto 0;
			font-weight: 600;
		}

		.content {
			margin-top: 20rpx;

			.input_box_text,
			.input_box_check {
				// width: 75%;
				padding: 24rpx 0 0 24rpx;
				background-color: #d9d9d9;
				border-radius: 100rpx;
				height: 76rpx;
				line-height: 76rpx;
			}

			.input_box_check {
				.check_btn {
					position: absolute;
					right: 30rpx;
					top: 10rpx;
					font-size: 27rpx;
					color: #444444;
				}
			}

			.submit {
				margin-top: 200rpx;
				border-radius: 100rpx;

				u-button {
					color: #000 !important;
				}
			}
			.to_reg{
				font-size: 27rpx;
			}
		}
	}

	.mt-20 {
		margin-top: 20rpx;
	}
</style>